#ifndef __world_h__
#define __world_h__

#include <ros/ros.h>

#include "simulation/Distance.h"
#include "simulation/map.h"
#include "simulation/robot.h"

#include <driver/Movement.h>

typedef struct {
	float x;
	float y;
	float angle;
} Position;

class World
{
public:
	World(int argc, char **argv);
	~World();

private:
	Map *map;
	Robot robot;
	double wheel_base;

	ros::Subscriber motor_movement_subscriber;

	void renderRay(float from_x, float from_y, float to_x, float to_y);

	void movement_message(const driver::Movement::ConstPtr& msg);

	bool distance_request(simulation::Distance::Request &request,
						 simulation::Distance::Response &response);
};

#endif
